#pragma once

#ifndef _D3DXMesh_h_
#define _D3DXMesh_h_

#include <d3dx9mesh.h>
#include <vector>
#include "../d3d/d3dUtility.h"

namespace Framework {

using namespace std;

class D3DXMesh {
public:
    D3DXMesh(ID3DXMesh* mesh);
    virtual ~D3DXMesh(void);
    d3d::BoundingBox* GetBoundingBox() const;
    d3d::BoundingSphere* GetBoundingSphere() const;
    vector<D3DMATERIAL9>* GetMaterials() const;
    ID3DXMesh* GetMesh() const;
    vector<IDirect3DBaseTexture9*>* GetTextures() const;
private:
    d3d::BoundingBox* boundingBox;
    d3d::BoundingSphere* boundingSphere;
    vector<D3DMATERIAL9>* materials;
    ID3DXMesh* mesh;
    vector<IDirect3DBaseTexture9*>* textures;
    void CalculateBoundingGeometry();
};

}

#endif
